package com.dime.basic.api;



import com.dime.basic.api.domain.DimeBasehealthadvice;
import com.dime.basic.api.factory.RemoteHealthadviceFallbackFactory;
import com.dime.basic.api.model.healthDto;
import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(contextId = "remoteHealthadviceService", value = ServiceNameConstants.DM_BASIC, fallbackFactory = RemoteHealthadviceFallbackFactory.class)
public  interface RemoteHealthadviceService {

    @PostMapping("/basehealthadvice/info/healthadviceList")
    public R<List<DimeBasehealthadvice>> getHealthadviceList(@RequestBody DimeBasehealthadvice dimeBasehealthadvice,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @GetMapping ("/basehealthadvice/info/healthadviceBygroupIdsList/{groupids}")
    public R<List<DimeBasehealthadvice>> getHealthadviceBygroupIdsList(@PathVariable(value = "groupids") String[] groupids,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);




    @GetMapping ("/basehealthadvice/info/healthDtoList/{groupids}")
    public R<List<healthDto>> gethealthDtoList(@PathVariable(value = "groupids") String[] groupids, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
